package com.bright.ghj.overt.repository.second;

import com.bright.ghj.overt.pojo.po.second.PublicInfoMasterTable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author Tz
 * @date 2024/01/22 15:03
 * @Description 党廉公开信息主表的 Repository
 */
public interface PublicInfoMasterTableRepository extends JpaRepository<PublicInfoMasterTable, String>, JpaSpecificationExecutor<PublicInfoMasterTable> {

    /**
     * 根据条件党廉公开主表信息
     *
     * @param messageSendingTime 公开表公开的时间列表
     * @param dwbm               单位编码
     * @return                   返回党廉公开主表信息列表
     */
    @Query("from PublicInfoMasterTable where xxfssj in (:messageSendingTime) and dwbm = :dwbm")
    List<PublicInfoMasterTable> listPublicInfoMasterTable(@Param("messageSendingTime") List<String> messageSendingTime, @Param("dwbm")String dwbm);
}
